<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/default.css" rel="stylesheet" type="text/css" />
<title>#{bismillah.addNewClient}</title>
</head>

<f:view>
	<body>

	<img src="images/DukeGuitar.jpg" class="floatLeft" height="82"
		width="96" />
	<h1>#{stock.clients_title}</h1>
	<br clear="all"></br>
	<table width="100%">
		<tr>
			<td style="background-color: #200070" height="5"></td>
		</tr>
	</table>
	<br clear="all"></br>

	<h:form>
		<rich:simpleTogglePanel switchType="client"
			label="#{bismillah.newProductRegistration}">
			<h:messages />
			<h:panelGrid columns="3">
				<h:outputText value="#{bismillah.clientName}" />
				<h:inputText id="name" value="#{product.product.name}" />
				<h:message style="color: red;" for="name" />
				<h:outputText value="#{bismillah.description}" />
				<h:inputText id="description" value="#{product.product.description}" />
				<h:message style="color: red;" for="description" />
				<h:outputText value="#{bismillah.stockPriceLabel}" />
				<h:inputText id="stockPrice" value="#{product.product.stockPrice}" />
				<h:message style="color: red;" for="stockPrice" />
				<h:outputText value="#{bismillah.retailPriceLabel}" />
				<h:inputText id="retailPrice"
					defaultLabel="#{bismillah.enterRetailPrice}"
					value="#{product.product.retailPrice}" />
				<h:message style="color: red;" for="retailPrice" />
				<h:outputText value="#{bismillah.creditPriceLabel}" />
				<h:inputText id="creditPrice"
					defaultLabel="#{bismillah.enterCreditPrice}"
					value="#{product.product.creditPrice}" />
				<h:message style="color: red;" for="creditPrice" />

				<h:outputText value="S.T.U." />
				<h:inputText id="smallestTradabeUnit"
					value="#{product.product.smallestTradabeUnit}" label="S.T.U."
					validator="quantityValidator" />
				<h:message for="smallestTradabeUnit" style="color:red" />
				
				<h:outputText value="#{bismillah.defaultCategory}" />
				<h:selectOneMenu id="defaultCategory"
					value="#{product.product.defaultCategory}">
					<!-- f:selectItem itemLabel="#{bismillah.enterACategory}" itemValue="0"/> -->
					<f:selectItems id="categoryList1"
						value="#{product.categories.list}" />
				</h:selectOneMenu>
				<h:message style="color: red;" for="defaultCategory" />
				<h:outputText value="#{bismillah.secondaryCategories}" />
				<!-- rich:pickList id="secondaryCategories" label="#{bismillah.selectCategories}" value="#{product.product.categories}">
					<f:facet name="copyAllControl">
						<h:commandButton value="#{bismillah.copyAllLabel}" />
					</f:facet>
					<f:facet name="copyControl">
						<h:commandButton value="#{bismillah.copyLabel}" />
					</f:facet>
					<f:facet name="removeControl">
						<h:commandButton value="#{bismillah.removeLabel}" />
					</f:facet>
					<f:facet name="removeAllControl">
						<h:commandButton value="#{bismillah.removeAllLabel}" />
					</f:facet>
					<f:selectItems id="categoryList2" value="#{product.categories.list}" />
				</rich:pickList> -->
				<h:message style="color: red;" for="secondaryCategories" />
			</h:panelGrid>
			<a4j:commandButton value="#{bismillah.addProduct}"
				action="#{product.add}" />
		</rich:simpleTogglePanel>
	</h:form>

	</body>
</f:view>
</html>
